import ai.xiaodao.tool.ConfigUtil;
import ai.xiaodao.trade.SecQuote;
import ai.xiaodao.trade.SecTrade;
import com.futu.openapi.FTAPI;

/**
 * Main module for autotrade
 */
public class TradeMain {
    public static void main(String[] args) throws Exception {
        String cnfDir = "D:\\proj\\futuapij\\autotrade\\src\\main\\resources\\conf";
        //initialization broker config
        ConfigUtil.initConfig(cnfDir);
        FTAPI.init();
        SecTrade trade = new SecTrade();
        trade.start();
        SecQuote qot = new SecQuote(trade);
        qot.start(false);
//        TestTrd trd = new TestTrd();
//        trd.start();

        trade.GetPositionList();


        while (true) {
            try {
                Thread.sleep(1000 * 600);
            } catch (InterruptedException exc) {

            }
        }
    }
}
